#ifndef TOOLTIPMANAGER_H
#define TOOLTIPMANAGER_H

#include <QObject>
#include <QLabel>
#include <QTimer>
#include <QQueue>
#include <QDateTime>

class TooltipManager : public QObject
{
    Q_OBJECT
public:
    explicit TooltipManager(QObject *parent = nullptr);
    ~TooltipManager();

    void bindLabel(QLabel *label);
    void setTooltip(const QString &text, int durationMs = 3000);

private slots:
    void onTimeout();
    void processNextTooltip();

private:
    QLabel *m_label;
    QTimer m_hideTimer;
    QQueue<QPair<QPair<QString, QDateTime>, int>> m_tooltipQueue; // <Text, Time>, Duration
    bool m_isDisplaying;
    const int MAX_QUEUE_SIZE = 5;
};

#endif // TOOLTIPMANAGER_H
